package com.qf.service.impl;

import com.qf.mapper.NoticeMapper;
import com.qf.pojo.Notice;
import com.qf.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("noticeService")
public class NoticeServiceImpl implements NoticeService {

    @Autowired
    private NoticeMapper noticeMapper;

    @Override
    public List<Notice> findAll() {
        System.out.println("service");
        return noticeMapper.findAll();
    }

    @Override
    public void updateNotice(Notice notice) {
        System.out.println("service");
        noticeMapper.updateNotice(notice);
    }

    @Override
    public void deleteNotice(Integer id) {
        noticeMapper.deleteNotice(id);
    }

    @Override
    public void deleteAll(Integer[] ids) {
        noticeMapper.deleteAll(ids);
    }

    @Override
    public void addNotice(Notice notice) {
        noticeMapper.addNotice(notice);
    }
}
